package com.lightbook.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lightbook.mapper.ClassificationMapper;
import com.lightbook.pojo.Classification;
import com.lightbook.service.ClassificationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ClassificationServiceImpl extends ServiceImpl<ClassificationMapper, Classification> implements ClassificationService {

    @Autowired
    ClassificationMapper classificationMapper;
    @Override
    public List<Classification> findTeachplayTree(long classificationId) {
        return classificationMapper.selectTreeNodes(classificationId);
    }

    @Override
    public List<Classification> findTeachplayTreeAll() {
        return classificationMapper.selectAll();
    }
}
